using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using Zoo.Domain;

namespace TestZooLibrary.Helpers
{
    public class TestUsers
    {

        private  TestUser[] _testUsers;
        public TestUsers(int capacity)
        {
            _testUsers = new TestUser[capacity];
        }

        public TestUsers(TestUser[] testUserArray)
        {
            _testUsers = testUserArray;
            
        }

        public TestUser this[int i]
        {
            get
            {
                return _testUsers[i];
            }
            set
            {
                _testUsers[i] = value;
            }
        }

        public void RegisterAll()
        {
            foreach (TestUser user in _testUsers)
            {
                user.Register();
            }
        }

        public int Count
        {
            get 
            {
                return _testUsers.Length;
            }
        }

        public void DeleteAll()
        {
            foreach (TestUser user in _testUsers)
            {
                user.Delete();
            }
        }

        public IdentityCard[] ToIdentityCardArray()
        {
            IdentityCard[] identityCards=new IdentityCard[_testUsers.Length];
            for (int i = 0; i < _testUsers.Length; i++)
            {
                identityCards[i] = new IdentityCard();
                identityCards[i].Description = _testUsers[i].Description;
                identityCards[i].BornDate = _testUsers[i].BornDate;
                identityCards[i].City = _testUsers[i].City;
                               
            }
            throw new NotImplementedException();
        }
    }
}
